home *** CD-ROM | disk | FTP | other *** search
/ PC World 2007 January / PCWorld_2007-01_cd.bin / v cisle / widget / widget.exe / Universal_Converter.widget / Converter.widget / Contents / Converter.kon
Extensible Markup Language  |  2006-10-27  |  8KB  |  292 lines

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <widget>
  3.     <debug>off</debug>
  4.     <window>
  5.         <name>Converter_widget</name>
  6.         <width>435</width>
  7.         <height>365</height>
  8.         <visible>true</visible>
  9.         <image src="Resources/Top.png" name="top">
  10.             <opacity>255</opacity>
  11.             <vOffset>5</vOffset>
  12.             <width>430</width>
  13.         </image>
  14.         <!--<image src="Resources/Mid.png" name="mid">
  15.             <opacity>255</opacity>
  16.             <vOffset>23</vOffset>
  17.             <width>430</width>
  18.             <height>77</height>
  19.         </image>
  20.         <image src="Resources/Base1.png" name="base">
  21.             <opacity>255</opacity>
  22.             <vOffset>100</vOffset>
  23.             <width>430</width>
  24.         </image>-->
  25.         <image src="Resources/bg.png" name="bg">
  26.             <opacity>255</opacity>
  27.             <vOffset>23</vOffset>
  28.             <height>114</height>
  29.             <width>430</width>
  30.         </image>
  31.         <image src="Resources/Reflection.png">
  32.             <vOffset>10</vOffset>
  33.             <hOffset>16</hOffset>
  34.             <width>398</width>
  35.         </image>
  36.     </window>
  37.     <text>
  38.         <data>Conversion Calculator</data>
  39.         <style>bold</style>
  40.         <color>#FFFFFF</color>
  41.         <size>16</size>
  42.         <vOffset>35</vOffset>
  43.         <hOffset>25</hOffset>
  44.     </text>
  45.     <image name="arrow" src="Resources/arrow.png">
  46.         <vOffset>30</vOffset>
  47.         <hOffset>208</hOffset>
  48.         <opacity>255</opacity>
  49.         <hRegistrationPoint>8</hRegistrationPoint>
  50.         <vRegistrationPoint>9</vRegistrationPoint>
  51.         <onMouseDown>fn_toggle(flagInt++);</onMouseDown>
  52.     </image>
  53.     <image name="gear" src="Resources/GEAR.gif">
  54.         <vOffset>10</vOffset>
  55.         <hOffset>300</hOffset>
  56.         <opacity>160</opacity>
  57.     </image>
  58.     <image src="Resources/close.png">
  59.         <name>close</name>
  60.         <vOffset>16</vOffset>
  61.         <hOffset>396</hOffset>
  62.         <tooltip>Close</tooltip>
  63.         <tracking>rectangle</tracking>
  64.         <opacity>100</opacity>
  65.         <onMouseExit>close.opacity=90</onMouseExit>
  66.         <onMouseEnter>close.opacity=160</onMouseEnter>
  67.         <onMouseDown>
  68.             closeWidget();
  69.         </onMouseDown>    
  70.     </image>
  71.     <text name="convTxt">
  72.         <data>Convert :</data>
  73.         <style>bold</style>
  74.         <color>#FFFFFF</color>
  75.         <size>12</size>
  76.         <vOffset>65</vOffset>
  77.         <hOffset>25</hOffset>
  78.     </text>
  79.     <textarea>
  80.         <name>unitsTB</name>
  81.         <bgColor>#FFFFFF</bgColor>
  82.         <bgOpacity>255</bgOpacity>
  83.         <font>sans,verdana, arial</font>
  84.         <size>12</size>
  85.         <color>#333333</color>
  86.         <columns>10</columns>
  87.         <lines>1</lines>
  88.         <vOffset>54</vOffset>
  89.         <hOffset>80</hOffset>
  90.         <editable>false</editable>
  91.             <onLoseFocus>foc1.opacity=0</onLoseFocus>
  92.     </textarea>
  93.     <image name="convDD" src="Resources/dropdown.png">
  94.         <vOffset>53</vOffset>
  95.         <hOffset>190</hOffset>
  96.         <opacity>200</opacity>
  97.         <height>18</height>
  98.         <onMouseDown>
  99.             foc1.opacity = 255;
  100.             unitsTB.focus();
  101.             convItems = new Array();
  102.             var convList = ["Area","Angular", "Bits and bytes", "Distance", "Energy", "Power", "Pressure", "Speed", "Temperature", "Time", "Volume", "Weight", "Illuminance", "Flow rate[volume]", "Radix (base N)"];
  103.             for(i=0;i<convList.length;i++) {
  104.                 convItems[i] = new MenuItem;
  105.                 convItems[i].title = convList[i];
  106.                 convItems[i].enabled = true;
  107.                 convItems[i].onSelect = "unitsTB.data='"+convList[i]+"';unitVal="+i+";fn_populate1();";
  108.                 if(convList[i]==unitsTB.data){
  109.                     convItems[i].checked = true;
  110.                 }
  111.             }
  112.             popupMenu( convItems, convDD.hOffset-110, convDD.vOffset + 16 );
  113.         </onMouseDown>
  114.     </image>
  115.     <image name="foc1" src="Resources/focusring.png">
  116.         <vOffset>46</vOffset>
  117.         <hOffset>18</hOffset>
  118.         <opacity>0</opacity>
  119.         <width>195</width>
  120.         <colorize>#00DD00</colorize>
  121.         <hslAdjustment>0,40,40</hslAdjustment>
  122.     </image>
  123.     <textarea>
  124.         <name>convertTB</name>
  125.         <bgColor>#FFFFFF</bgColor>
  126.         <bgOpacity>255</bgOpacity>
  127.         <font>sans,verdana, arial</font>
  128.         <size>12</size>
  129.         <color>#333333</color>
  130.         <columns>15</columns>
  131.         <lines>1</lines>
  132.         <vOffset>54</vOffset>
  133.         <hOffset>225</hOffset>
  134.         <onGainFocus>foc2.opacity=255</onGainFocus>
  135.         <onLoseFocus>foc2.opacity=0</onLoseFocus>
  136.         <onKeyPress>
  137.             if ( system.event.keyString == 'Return' || system.event.keyString == 'Enter' || system.event.keyString == 'Tab' )
  138.             {
  139.                 fn_doConvert();
  140.             }
  141.             </onKeyPress>
  142.     </textarea>
  143.     <image name="foc2" src="Resources/focusring.png">
  144.         <vOffset>46</vOffset>
  145.         <hOffset>215</hOffset>
  146.         <opacity>0</opacity>
  147.         <width>168</width>
  148.         <colorize>#00DD00</colorize>
  149.         <hslAdjustment>0,40,40</hslAdjustment>
  150.     </image>
  151.     <text name="fromTxt">
  152.         <data>From :</data>
  153.         <style>bold</style>
  154.         <color>#FFFFFF</color>
  155.         <size>12</size>
  156.         <vOffset>95</vOffset>
  157.         <hOffset>25</hOffset>
  158.     </text>
  159.     <textarea>
  160.         <name>fromTB</name>
  161.         <bgColor>#FFFFFF</bgColor>
  162.         <bgOpacity>255</bgOpacity>
  163.         <font>sans,verdana, arial</font>
  164.         <size>12</size>
  165.         <color>#333333</color>
  166.         <columns>10</columns>
  167.         <lines>1</lines>
  168.         <vOffset>84</vOffset>
  169.         <hOffset>80</hOffset>
  170.         <editable>false</editable>
  171.             <onLoseFocus>foc3.opacity=0</onLoseFocus>
  172.     </textarea>
  173.     <image name="fromDD" src="Resources/dropdown.png">
  174.         <vOffset>83</vOffset>
  175.         <hOffset>190</hOffset>
  176.         <opacity>200</opacity>
  177.         <height>18</height>
  178.         <onMouseDown>
  179.             foc3.opacity = 255;
  180.             fromTB.focus();
  181.             for(i=0;i<fromItems.length;i++) {
  182.                 fromItems[i].checked = (fromTB.data == fromItems[i].title)?true:false;
  183.             }
  184.             popupMenu( fromItems, fromDD.hOffset-110, fromDD.vOffset + 16 );
  185.         </onMouseDown>
  186.     </image>
  187.     <image name="foc3" src="Resources/focusring.png">
  188.         <vOffset>76</vOffset>
  189.         <hOffset>18</hOffset>
  190.         <opacity>0</opacity>
  191.         <width>195</width>
  192.         <colorize>#00DD00</colorize>
  193.         <hslAdjustment>0,40,40</hslAdjustment>
  194.     </image>
  195.     <text name="toTxt">
  196.         <data>To :</data>
  197.         <style>bold</style>
  198.         <color>#FFFFFF</color>
  199.         <size>12</size>
  200.         <vOffset>94</vOffset>
  201.         <hOffset>225</hOffset>
  202.     </text>
  203.     <textarea>
  204.         <name>toTB</name>
  205.         <bgColor>#FFFFFF</bgColor>
  206.         <bgOpacity>255</bgOpacity>
  207.         <font>sans,verdana, arial</font>
  208.         <size>12</size>
  209.         <color>#333333</color>
  210.         <columns>10</columns>
  211.         <lines>1</lines>
  212.         <vOffset>84</vOffset>
  213.         <hOffset>251</hOffset>
  214.         <editable>false</editable>
  215.             <onLoseFocus>foc4.opacity=0</onLoseFocus>
  216.     </textarea>
  217.     <image name="toDD" src="Resources/dropdown.png">
  218.         <vOffset>83</vOffset>
  219.         <hOffset>361</hOffset>
  220.         <opacity>200</opacity>
  221.         <height>18</height>
  222.         <onMouseDown>
  223.             foc4.opacity = 255;
  224.             toTB.focus();
  225.             for(i=0;i<toItems.length;i++) {
  226.                 (toItems[i])?toItems[i].checked = (toTB.data == toItems[i].title)?true:false:"";
  227.             }
  228.             popupMenu( toItems, toDD.hOffset-110, toDD.vOffset + 16 );
  229.         </onMouseDown>
  230.     </image>
  231.     <image name="foc4" src="Resources/focusring.png">
  232.         <vOffset>76</vOffset>
  233.         <hOffset>215</hOffset>
  234.         <opacity>0</opacity>
  235.         <width>168</width>
  236.         <colorize>#00DD00</colorize>
  237.         <hslAdjustment>0,40,40</hslAdjustment>
  238.     </image>
  239.     <image name="go" src="Resources/go.png">
  240.         <vOffset>82</vOffset>
  241.         <hOffset>382</hOffset>
  242.         <tracking>rectangle</tracking>
  243.         <onMouseDown>
  244.             foc5.opacity = 255;
  245.             fn_doConvert();
  246.             convTB.focus();
  247.         </onMouseDown>
  248.         <onMouseUp>
  249.             foc5.opacity = 0;
  250.         </onMouseUp>
  251.     </image>
  252.     <image name="foc5" src="Resources/foc5.png">
  253.         <vOffset>77</vOffset>
  254.         <hOffset>374</hOffset>
  255.         <opacity>0</opacity>
  256.         <colorize>#00FF00</colorize>
  257.         <hslAdjustment>5,20,20</hslAdjustment>
  258.     </image>
  259.     <image name="foc6" src="Resources/focusring.png">
  260.         <vOffset>100</vOffset>
  261.         <hOffset>74</hOffset>
  262.         <opacity>0</opacity>
  263.         <width>300</width>
  264.         <colorize>#00DD00</colorize>
  265.         <hslAdjustment>0,40,40</hslAdjustment>
  266.     </image>
  267.     <preference name="themecolor">
  268.         <title>Theme Color:</title>
  269.         <type>color</type>
  270.         <minLength>0</minLength>
  271.         <maxLength>250</maxLength>
  272.         <ticks>20</ticks>
  273.         <defaultValue>100</defaultValue>
  274.         <description>Please choose a color for your Stop Watch to display.</description>
  275.     </preference>
  276.     <preference name="changeButton">
  277.         <title>Apply to Buttons also.</title>
  278.         <type>checkbox</type>
  279.         <defaultValue>0</defaultValue>
  280.         <description>Check this box to apply the color for dropdown buttons.</description>
  281.     </preference>
  282.     <action trigger="onPreferencesChanged">
  283.         fn_updateTheme();
  284.     </action>
  285.     <about-box>
  286.         <image>Resources/About.png</image>
  287.     </about-box>
  288.     <action trigger="onLoad">
  289.         include("Resources/converter.js");
  290.         fn_updateTheme();
  291.     </action>
  292. </widget>